package com.wn.budget.model;

import com.wn.budget.code.BaseEntity;
import lombok.Data;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.OneToOne;

/**
 * 工程材料
 */
@Data
@Entity
public class ProjectMaterial extends BaseEntity {
    /// <summary>
    /// 工程Id
    /// </summary>
    @Column(length = 36)
    public String projectId;

    /**
     * 空间id
     */
    @Column(name="project_space_id",length = 36)
    public String projectSpaceId;

    /**
     * 材料id
     */
    @Column(name = "material_id",length = 36)
    public String materialId;
    /**
     * 材料
     */
    @OneToOne
    @JoinColumn(name = "material_id",updatable = false,insertable = false)
    public Material material;

    /// <summary>
    /// 用量
    /// </summary>
    public int quantity;


}
